using System;
using Unis.Framework.ORM.Attributes;

namespace KingRoad.EPM.SafetyManagementEntity.Model
{
    [Serializable]
    [ModelMap("BF_USER", new string[] { "USER_ID" })]
    public class BF_USER : BaseEntity
    {
        public BF_USER()
        {
            //this.BF_ROLE_USER = new List<BF_ROLE_USER>();
            //this.BF_USER_LOGIN_MODE = new List<BF_USER_LOGIN_MODE>();
            //this.BF_USER_USBKEY = new List<BF_USER_USBKEY>();
            //this.BF_USER_LOGIN_LOG = new List<BF_USER_LOGIN_LOG>();
            //this.BF_USER_CERTIFICATE = new List<BF_USER_CERTIFICATE>();
        }

        private Guid _userId;
        [ColumnMap("USER_ID", System.Data.DbType.String)]
        public System.Guid USER_ID
        {
            get { return _userId; }
            set
            {
                if (object.Equals(this._userId, value) != true)
                {
                    this._userId = value;
                    this.RaisePropertyChanged("USER_ID");
                }
            }
        }

        private string _code;

        [ColumnMap("CODE", System.Data.DbType.String)]
        public string CODE
        {
            get { return _code; }
            set
            {
                if (object.Equals(this._code, value) != true)
                {
                    this._code = value;
                    this.RaisePropertyChanged("CODE");
                }
            }
        }

        private string _name;
        [ColumnMap("NAME", System.Data.DbType.String)]
        public string NAME
        {
            get { return _name; }
            set
            {
                if (object.Equals(this._name, value) != true)
                {
                    this._name = value;
                    this.RaisePropertyChanged("NAME");
                }
            }
        }



        private Guid _ownerId;
        [ColumnMap("OWNER_ID", System.Data.DbType.String)]
        public Guid OWNER_ID
        {
            get { return _ownerId; }
            set
            {
                if (object.Equals(this._ownerId, value) != true)
                {
                    this._ownerId = value;
                    this.RaisePropertyChanged("OWNER_ID");
                }
            }
        }


        private string _orgRoleType;
        [ColumnMap("ORG_ROLE_TYPE", System.Data.DbType.String)]
        public string ORG_ROLE_TYPE
        {
            get { return _orgRoleType; }
            set
            {
                if (object.Equals(this._orgRoleType, value) != true)
                {
                    this._orgRoleType = value;
                    this.RaisePropertyChanged("ORG_ROLE_TYPE");
                }
            }
        }

        private byte[] _timeStamp;
        [ColumnMap("TIME_STAMP", System.Data.DbType.Binary)]
        public byte[] TIME_STAMP
        {
            get { return _timeStamp; }
            set
            {
                if (object.Equals(this._timeStamp, value) != true)
                {
                    this._timeStamp = value;
                    this.RaisePropertyChanged("TIME_STAMP");
                }
            }
        }
        //public virtual ICollection<BF_ROLE_USER> BF_ROLE_USER { get; set; }
        //public virtual ICollection<BF_USER_LOGIN_MODE> BF_USER_LOGIN_MODE { get; set; }
        //public virtual ICollection<BF_USER_USBKEY> BF_USER_USBKEY { get; set; }
        //public virtual ICollection<BF_USER_LOGIN_LOG> BF_USER_LOGIN_LOG { get; set; }
        //public virtual ICollection<BF_USER_CERTIFICATE> BF_USER_CERTIFICATE { get; set; }
    }
}
